/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.qcoinpay;

import android.text.TextUtils;
import android.widget.Toast;
import com.qihoopp.framework.HttpLoaderCallback;
import com.qihoopp.framework.LogUtil;
import org.json.JSONObject;

final class be implements HttpLoaderCallback {
    public final void callback(int paramInt, JSONObject paramJSONObject) {
        QcoinActivity.a(this.b).a();
        if (paramInt == 2) {
            Toast.makeText(QcoinActivity.b(this.b), a.a(b.bj), 0).show();
            return;
        }
        if (paramInt == 3) {
            Toast.makeText(QcoinActivity.b(this.b), a.a(b.bl), 0).show();
            return;
        }
        if (paramInt == 5) {
            Toast.makeText(QcoinActivity.b(this.b), a.a(b.bi), 0).show();
            return;
        }
        if (paramInt == 4) {
            Toast.makeText(QcoinActivity.b(this.b), a.a(b.bh), 0).show();
            return;
        }
        if ((paramInt == -1) || (paramInt != 1))
            return;
        paramInt = null;
        String str = null;
        if (paramJSONObject != null) {
            try {
                paramInt = paramJSONObject.getString("result_code");
                str = paramJSONObject.getString("result_msg");
            } catch (org.json.JSONException paramJSONObject) {
                LogUtil.e("QcoinActivity", "JSONException", paramJSONObject);
            }
            if ((paramInt != null) && ("0000".equals(paramInt))) {
                Toast.makeText(QcoinActivity.b(this.b), a.a(b.bm), 0).show();
                QcoinActivity.d(this.b).a();
                str = z.a[(java.lang.Integer.valueOf(this.a).intValue() - 1)];
                paramJSONObject = this.a;
                paramInt = QcoinActivity.e(this.b);
                LogUtil.e("OrderModel", "updateSafeQuestion q_id is : " + paramJSONObject + " q_desc is : " + str);
                paramInt.n = paramJSONObject;
                paramInt.o = str;
                QcoinActivity.a(this.b).d.g.j = QcoinActivity.e(this.b);
                if (QcoinActivity.a(this.b).d.a()) {
                    LogUtil.e("---", "normal");
                    QcoinActivity.a(this.b).d.g.a(0);
                    return;
                }
                LogUtil.e("---", "nomore");
                QcoinActivity.a(this.b).d.g.a(2);
                return;
            }
        }
        paramJSONObject = a.a(b.bn);
        if (!(TextUtils.isEmpty(str)))
            paramJSONObject = str;
        Toast.makeText(QcoinActivity.b(this.b), paramJSONObject, 0).show();
    }
}